package com.axjy.his.service.impl;

import com.axjy.his.mapper.UserMapper;
import com.axjy.his.pojo.User;
import com.axjy.his.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lenovo on 2017/11/1.
 */
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper usermap;

    public List<User> selectAllUser() {
        return usermap.selectAllUser();
    }

    public void grant(Integer userId, Integer roleId) {
        usermap.updateRoleId(userId, roleId);
    }


}
